package com.jindianjichi.common.enums;

import lombok.Getter;

@Getter
public enum IsDeletedFlagEnum {

    NOT_DELETED(0, "未删除"),
    DELETED(1, "已删除")
    ;

    private Integer code;
    private String desc;

    IsDeletedFlagEnum(Integer code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public  static IsDeletedFlagEnum getByCode(Integer code){
        for (IsDeletedFlagEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }
}
